//
//  LotteryView1.m
//  K8彩票
//
//  Created by zhoubo on 2017/6/7.
//  Copyright © 2017年 zhoubo. All rights reserved.
//

#import "LotteryView1.h"
#import "TimeLabel.h"

@interface LotteryView1()

@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *titleLbl;








@end

@implementation LotteryView1

-(void)layoutSubviews
{
    
    if ([UIScreen mainScreen].bounds.size.width <375) {
        self.titleLbl.font = [UIFont systemFontOfSize:15];
    }
    CGFloat height = self.imgView.frame.size.height;
    self.imgView.layer.cornerRadius = height/2;
    self.imgView.layer.masksToBounds = YES;


    
}

-(void)setModel:(LotteryModel *)model
{
    _model = model;
    

    self.titleLbl.text = model.title;
    self.imgView.image = [UIImage imageNamed:model.imgName];

    
//    self.timeLbl.text = [NSString stringWithFormat:@"%02ld:%02ld",self.model.timeCount/60,self.model.timeCount%60];
    
//    if (model.timeCount == -1) {
// 
//        CGRect frame = self.titleLbl.frame;
//        [self.titleLbl removeFromSuperview];
//        UILabel* lbl= [[UILabel alloc]initWithFrame:CGRectMake(frame.origin.x, frame.origin.y + 10  , frame.size.width, frame.size.height)];
//        self.titleLbl = lbl;
//        self.titleLbl.text = @"更多彩种";
//        [self addSubview:self.titleLbl];
//        [self.timeLbl removeFromSuperview];
        
        
//    }
}

-(void)awakeFromNib
{
    
       

}










@end
